<?Lassoscript
// Last modified 4/17/09 by Eric Landmann

// FUNCTIONALITY
// This file processes action_params

// CHANGE NOTES
// 4/17/09
// Version 1.0

// Copying Action_Params to vars
// Remove leading and trailing spaces
// If required is missing, output an error
// If multiple errors, they will step on each other, but not worried about it

If: (Action_Param:'Error') != '';
	Var:'vError' = (Action_Param:'Error');
/If;
If: (Action_Param:'Option') != '';
	Var:'vOption' = (Action_Param:'Option');
/If;

// Pass a param "New" through the URL to indicate it is a new page
Var:'vNew' = (Action_Param:'New');

Var:'vSID' = '';
Var:'vSID' = (Action_Param:'SID');
Var:'vProcess' = (Action_Param:'Process');

Var:'vSection_Title'=(Action_Param:'SectionTitle');
// Can't do this, throws "9941 Illegal attempt to modify a frozen value or type" error
//	$vSection_Title->Trim;
Var:'vRequest_Info'=(Action_Param:'RequestInfo');
// Can't do this, throws "9941 Illegal attempt to modify a frozen value or type" error
//	$vRequest_Info->Trim;
Var:'vAllow'=(Action_Param:'Allow');
// Can't do this, throws "9941 Illegal attempt to modify a frozen value or type" error
//	$vAllow->Trim;
Var:'vSection_Description'=(Action_Param:'SectionDescription');
	$vSection_Description->Trim;

// If required is missing, output error 1001 "Required Missing"
// but ONLY if the page has been submit
If: $vNew != 'Y';
	If: ($vSection_Title == '') || ($vRequest_Info == '') || ($vAllow == '');
		Var:'vError' = '1001';
	/If;
/If;
?>